﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on: 
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using VNet.VisiSuite.Dal;
using VNet.VisiSuite.Dal.FactoryClasses;
using VNet.VisiSuite.Dal.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace VNet.VisiSuite.Dal.RelationClasses
{
	/// <summary>Implements the relations factory for the entity: ReasonCode. </summary>
	public partial class ReasonCodeRelations
	{
		/// <summary>CTor</summary>
		public ReasonCodeRelations()
		{
		}

		/// <summary>Gets all relations of the ReasonCodeEntity as a list of IEntityRelation objects.</summary>
		/// <returns>a list of IEntityRelation objects</returns>
		public virtual List<IEntityRelation> GetAllRelations()
		{
			List<IEntityRelation> toReturn = new List<IEntityRelation>();
			toReturn.Add(this.AreaEntityUsingCloseWorkOrderReasonCodeId);
			toReturn.Add(this.AreaEntityUsingGoodReasonCodeId);
			toReturn.Add(this.AreaEntityUsingNoWorkOrdersReasonCodeId);
			toReturn.Add(this.AreaEntityUsingReworkReasonCodeId);
			toReturn.Add(this.AreaEntityUsingScrapReasonCodeId);
			toReturn.Add(this.AreaEntityUsingShiftStartReasonCodeId);
			toReturn.Add(this.AreaEntityUsingPlannedReasonCodeId);
			toReturn.Add(this.CellStatusEntityUsingReasonCodeId);
			toReturn.Add(this.DowntimeButtonEntityUsingReasonCodeId);
			toReturn.Add(this.ProductionHistoryEntityUsingReasonCodeId);
			toReturn.Add(this.ProductionHistoryDowntimeEventEntityUsingReasonCodeId);
			toReturn.Add(this.ProductionPlanScheduledDowntimeEntityUsingReasonCodeId);
			toReturn.Add(this.ReasonCodeEntityUsingParentId);
			toReturn.Add(this.ReasonCodeEntityUsingLinkId);
			toReturn.Add(this.ScheduleEntityUsingReasonCodeId);
			toReturn.Add(this.AreaEntityUsingAreaId);
			toReturn.Add(this.ReasonCodeEntityUsingReasonCodeIdParentId);
			toReturn.Add(this.ReasonCodeEntityUsingReasonCodeIdLinkId);
			toReturn.Add(this.RollupDefinitionEntityUsingRollupDefinitionId);
			toReturn.Add(this.UserLoginEntityUsingCreatedBy);
			toReturn.Add(this.UserLoginEntityUsingLastUpdatedBy);
			return toReturn;
		}

		#region Class Property Declarations

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.CloseWorkOrderReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingCloseWorkOrderReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.CloseWorkOrderReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.GoodReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingGoodReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas1" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.GoodReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.NoWorkOrdersReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingNoWorkOrdersReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas2" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.NoWorkOrdersReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.ReworkReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingReworkReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas3" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.ReworkReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.ScrapReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingScrapReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas4" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.ScrapReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.ShiftStartReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingShiftStartReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas5" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.ShiftStartReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Area.PlannedReasonCodeId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingPlannedReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Areas6" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, AreaFields.PlannedReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and CellStatusEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - CellStatus.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation CellStatusEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "CellStatus" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, CellStatusFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("CellStatusEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and DowntimeButtonEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - DowntimeButton.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation DowntimeButtonEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "DowntimeButtons" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, DowntimeButtonFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("DowntimeButtonEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ProductionHistoryEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - ProductionHistory.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ProductionHistoryEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "ProductionHistories" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ProductionHistoryFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ProductionHistoryEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ProductionHistoryDowntimeEventEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - ProductionHistoryDowntimeEvent.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ProductionHistoryDowntimeEventEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "ProductionHistoryDowntimeEvents" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ProductionHistoryDowntimeEventFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ProductionHistoryDowntimeEventEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ProductionPlanScheduledDowntimeEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - ProductionPlanScheduledDowntime.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ProductionPlanScheduledDowntimeEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "ProductionPlanScheduledDowntimes" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ProductionPlanScheduledDowntimeFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ProductionPlanScheduledDowntimeEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ReasonCodeEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - ReasonCode.ParentId
		/// </summary>
		public virtual IEntityRelation ReasonCodeEntityUsingParentId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "ReasonCodes" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ReasonCodeFields.ParentId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ReasonCodeEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - ReasonCode.LinkId
		/// </summary>
		public virtual IEntityRelation ReasonCodeEntityUsingLinkId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "ReasonCodes_" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ReasonCodeFields.LinkId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", false);
				return relation;
			}
		}

		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ScheduleEntity over the 1:n relation they have, using the relation between the fields:
		/// ReasonCode.ReasonCodeId - Schedule.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ScheduleEntityUsingReasonCodeId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "Schedules" , true);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ScheduleFields.ReasonCodeId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ScheduleEntity", false);
				return relation;
			}
		}


		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and AreaEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.AreaId - Area.AreaId
		/// </summary>
		public virtual IEntityRelation AreaEntityUsingAreaId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "Area", false);
				relation.AddEntityFieldPair(AreaFields.AreaId, ReasonCodeFields.AreaId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("AreaEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ReasonCodeEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.ParentId - ReasonCode.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ReasonCodeEntityUsingReasonCodeIdParentId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "ReasonCode", false);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ReasonCodeFields.ParentId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and ReasonCodeEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.LinkId - ReasonCode.ReasonCodeId
		/// </summary>
		public virtual IEntityRelation ReasonCodeEntityUsingReasonCodeIdLinkId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "ReasonCode_", false);
				relation.AddEntityFieldPair(ReasonCodeFields.ReasonCodeId, ReasonCodeFields.LinkId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and RollupDefinitionEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.RollupDefinitionId - RollupDefinition.RollupDefinitionId
		/// </summary>
		public virtual IEntityRelation RollupDefinitionEntityUsingRollupDefinitionId
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "RollupDefinition", false);
				relation.AddEntityFieldPair(RollupDefinitionFields.RollupDefinitionId, ReasonCodeFields.RollupDefinitionId);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("RollupDefinitionEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and UserLoginEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.CreatedBy - UserLogin.UserLoginId
		/// </summary>
		public virtual IEntityRelation UserLoginEntityUsingCreatedBy
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "UserLogin", false);
				relation.AddEntityFieldPair(UserLoginFields.UserLoginId, ReasonCodeFields.CreatedBy);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("UserLoginEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>Returns a new IEntityRelation object, between ReasonCodeEntity and UserLoginEntity over the m:1 relation they have, using the relation between the fields:
		/// ReasonCode.LastUpdatedBy - UserLogin.UserLoginId
		/// </summary>
		public virtual IEntityRelation UserLoginEntityUsingLastUpdatedBy
		{
			get
			{
				IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "UserLogin1", false);
				relation.AddEntityFieldPair(UserLoginFields.UserLoginId, ReasonCodeFields.LastUpdatedBy);
				relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("UserLoginEntity", false);
				relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ReasonCodeEntity", true);
				return relation;
			}
		}
		/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
		public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
		/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
		public virtual IEntityRelation GetSuperTypeRelation() { return null;}
		#endregion

		#region Included Code

		#endregion
	}
	
	/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
	internal static class StaticReasonCodeRelations
	{
		internal static readonly IEntityRelation AreaEntityUsingCloseWorkOrderReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingCloseWorkOrderReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingGoodReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingGoodReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingNoWorkOrdersReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingNoWorkOrdersReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingReworkReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingReworkReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingScrapReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingScrapReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingShiftStartReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingShiftStartReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingPlannedReasonCodeIdStatic = new ReasonCodeRelations().AreaEntityUsingPlannedReasonCodeId;
		internal static readonly IEntityRelation CellStatusEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().CellStatusEntityUsingReasonCodeId;
		internal static readonly IEntityRelation DowntimeButtonEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().DowntimeButtonEntityUsingReasonCodeId;
		internal static readonly IEntityRelation ProductionHistoryEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().ProductionHistoryEntityUsingReasonCodeId;
		internal static readonly IEntityRelation ProductionHistoryDowntimeEventEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().ProductionHistoryDowntimeEventEntityUsingReasonCodeId;
		internal static readonly IEntityRelation ProductionPlanScheduledDowntimeEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().ProductionPlanScheduledDowntimeEntityUsingReasonCodeId;
		internal static readonly IEntityRelation ReasonCodeEntityUsingParentIdStatic = new ReasonCodeRelations().ReasonCodeEntityUsingParentId;
		internal static readonly IEntityRelation ReasonCodeEntityUsingLinkIdStatic = new ReasonCodeRelations().ReasonCodeEntityUsingLinkId;
		internal static readonly IEntityRelation ScheduleEntityUsingReasonCodeIdStatic = new ReasonCodeRelations().ScheduleEntityUsingReasonCodeId;
		internal static readonly IEntityRelation AreaEntityUsingAreaIdStatic = new ReasonCodeRelations().AreaEntityUsingAreaId;
		internal static readonly IEntityRelation ReasonCodeEntityUsingReasonCodeIdParentIdStatic = new ReasonCodeRelations().ReasonCodeEntityUsingReasonCodeIdParentId;
		internal static readonly IEntityRelation ReasonCodeEntityUsingReasonCodeIdLinkIdStatic = new ReasonCodeRelations().ReasonCodeEntityUsingReasonCodeIdLinkId;
		internal static readonly IEntityRelation RollupDefinitionEntityUsingRollupDefinitionIdStatic = new ReasonCodeRelations().RollupDefinitionEntityUsingRollupDefinitionId;
		internal static readonly IEntityRelation UserLoginEntityUsingCreatedByStatic = new ReasonCodeRelations().UserLoginEntityUsingCreatedBy;
		internal static readonly IEntityRelation UserLoginEntityUsingLastUpdatedByStatic = new ReasonCodeRelations().UserLoginEntityUsingLastUpdatedBy;

		/// <summary>CTor</summary>
		static StaticReasonCodeRelations()
		{
		}
	}
}
